import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './assets/global.css'
import './mock/index.ts'
import './assets/iconFont/iconfont.css'
const app = createApp(App)
axios.defaults.baseURL = 'http://api.vikingship.xyz/' // 项目中使用的是Mock模拟数据
// 请求拦截
axios.interceptors.request.use((config: any) => {
  config.params = { ...config.params, token: '123456' } // 配置固定请求参数
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})
app.use(store)
app.use(router)
app.use(ElementPlus)
app.mount('#app')
